﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using PhotoGallery.Abstract;
using PhotoGallery.Entities;
using System.Data.Linq;
using System.Web.Mvc;

namespace PhotoGallery.Concrete
{
    public class SqlCategoryRepository : ICategoryRepository
    {
        private Table<Category> CategoryTable;

        public SqlCategoryRepository(string connectionString)
        {
            CategoryTable = (new DataContext(connectionString)).GetTable<Category>();
        }

        public IQueryable<Category> Category
        {
            get { return CategoryTable; }
        }
          
    }
}